﻿using WH.Contracts.Systems.Organizations;
using WH.Model.Systems;
using WH.Services.BaseService;
using Rw.Core.Common.Paging;
using WH.Common.Paging;

namespace WH.Services.IServices.ISystem
{
    public interface IOrganizationService : IBaseService<OrganizationEntity>
    {
        /// <summary>
        /// 获取机构信息表分页数据
        /// </summary>
        /// <param name="pager">分页</param>
        /// <param name="filter">查询条件实体</param>
        /// <returns></returns>
        Task<IPagedList<OrganizationEntity>> GetOrganizationsByPageAsync(PageParam pager, OrganizationFilter filter);

        /// <summary>
        /// 机构逻辑删除
        /// </summary>
        /// <param name="organization"></param>
        /// <returns></returns>

        Task<bool> SoftRemoveAsync(OrganizationEntity organization);

        /// <summary>
        /// 获取机构和所有子机构
        /// </summary>
        /// <param name="organizeId"></param>
        /// <returns></returns>
        Task<IList<OrganizationEntity>> GetOrganizeSelfAndSubsAsync(string organizeId);

        /// <summary>
        /// 获取机构名称全路径
        /// </summary>
        /// <param name="orgId"></param>
        /// <returns></returns>
        Task<string?> GetFullOrgName(string? orgId);
    }
}
